﻿<%@ Page Language="C#" MasterPageFile="~/Shared/FormPage.Master"  AutoEventWireup="true" CodeBehind="OrderShipping.aspx.cs" Inherits="Runda.CMS.Portal.OrderManagement.OrderShipping" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content runat="server" ContentPlaceHolderID="head" ID="myHeader">
    <link href="../Content/Tab/tabs.css" rel="stylesheet" type="text/css" /> 
      <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />
     <script src="../Content/jquery-1.3.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        function CheckForm() {
            if ($('#<%=txtSendBillNo.ClientID %>').val() == '') {
                alert('请输入快递单号!');
                return false;
            }
            if ($('#<%=txtSendCompany.ClientID %>').val() == '') {
                alert('请输入快递公司!');
                return false;
            }
        }       
    </script>
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="cphFormArea" ID="Content1">
     <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="9">
                        <img hspace="3" src="../Content/Menu/mnu_vSpacer.gif">
                    </td>
                    <td class="icMenu" nowrap>
                        <asp:LinkButton ID="lnkbtnSave" runat="server" onclick="lnkbtnSave_Click" OnClientClick="return CheckForm();"><span class="menu" title="保存"><img class="mnuBtn" src="../Content/Menu/Save_16_blue.gif"><span class="mnuBtn">保存</span></span></asp:LinkButton>
                        <asp:LinkButton ID="lnkbtnSaveAndClose" runat="server" onclick="lnkbtnSaveAndClose_Click" OnClientClick="return CheckForm();"><span class="menu" title="保存&amp;关闭" onclick="window.execScript(this.action);"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif"><span class="mnuBtn">保存&amp;关闭</span></span></asp:LinkButton>                     
                        <img src="../Content/Menu/separator.gif">
                        <span class="menu" title="关闭" onclick="window.close();"><img class="mnuBtn" src="../Content/Menu/Close_16_blue.gif"><span class="mnuBtn">关闭</span></span>
                    </td>
                </tr>
            </tbody>
        </table>
        
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
 
        <div id="areaForm" class="area">
            <table cellspacing="0" cellpadding="0" width="100%" height="100%">
                <tbody>                    
                    <tr>
                        <td valign="top">
                            <div style="display: inline;" id="appForm_tab0" class="tab">
                                <table style="table-layout: fixed" id="Section1" cellspacing="0" cellpadding="3" width="100%">
                                    <colgroup>
                                        <col width="80">
                                        <col>
                                        <tbody>
                                            <tr>
                                                <td class="req">
                                                    快递单号
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSendBillNo" runat="server" CssClass="input"></asp:TextBox> 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    快递公司
                                                </td>
                                                <td>
                                                     <asp:TextBox ID="txtSendCompany" runat="server" CssClass="input"></asp:TextBox> 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="vertical-align: top">
                                                   预计送达日期
                                                </td>
                                                <td>                                                 
                                                     <rad:RadDateTimePicker ID="txtPreReceivedDate" Width=160px runat="server" Culture="Chinese (People's Republic of China)"
                                                                    Skin="WebBlue"> 
                                                                    <DateInput Skin="WebBlue">
                                                                    </DateInput>
                                                                    <Calendar  Skin="WebBlue">  
                                                                        <SpecialDays>  
                                                                            <rad:RadCalendarDay Date="" Repeatable="Today">  
                                                                                <ItemStyle CssClass="radCalToday_WebBlue" />  
                                                                            </rad:RadCalendarDay>  
                                                                        </SpecialDays>  
                                                                    </Calendar>  
                                                                </rad:RadDateTimePicker>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    发货单
                                                </td>
                                                <td>
                                                    <rad:RadGrid runat="server" runat="server" ID="shippingRequests"  Skin="OCM" AutoGenerateColumns="False" >
                                                        <MasterTableView>
                                                            <Columns>
                                                                  <rad:GridTemplateColumn HeaderText="选择">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox runat="server" ID="shippingRequestCheck" />
                                                                    </ItemTemplate>
                                                                </rad:GridTemplateColumn>
                                                                <rad:GridTemplateColumn HeaderText="发货单号">
                                                                 <ItemTemplate>
                                                                       <asp:HyperLink ID="requestNum" runat="server" Target="_blank" Text='<%#Eval("requestId") %>' NavigateUrl='<%# "RequestDetail.aspx?shippingRequestId="+Eval("requestId") %>'></asp:HyperLink>
                                                                    </ItemTemplate>
                                                                </rad:GridTemplateColumn>
                                                            </Columns>
                                                        </MasterTableView>
                                                    </rad:RadGrid>
                                                </td>                                                 
                                            </tr>
                                        </tbody>
                                </table>
                            </div>                              
                        </td>
                    </tr>
                       <tr>
                <td class="statusBar" colspan="2">
                </td>
                </tr>
                </tbody>
            </table>
            <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
        <div style="margin: 5px 0 5px 0">
        </div>
        <table class="mnubar" cellspacing="0" cellpadding="0" height="400px">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>快递单明细</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                        <span class="menu" >
                             </span>
                    </td>
                </tr>
            </tbody>
        </table>
             <asp:Repeater ID="RepeaterShippings" runat="server" 
                       OnItemDataBound="RepeaterShippings_ItemDataBound">
                 <HeaderTemplate>
                    <table id="grid" class="grid" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="header">
                    <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">快递单号</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                      <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">快递公司</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                        <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">相关发货单</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                       <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">预计到达日期</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                     <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">签收人</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                     <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">签收日期</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                </tr>
                 </HeaderTemplate>
                 <ItemTemplate>
                  <tr class="data"  oid='<%# Eval("sendBillNo") %>'>
                    <td><asp:Label runat="server" ID = "sendBillNo" Text= '<%# Eval("sendBillNo") %>'></asp:Label></td>                             
                    <td><asp:Label runat="server" ID = "sendCompany" Text= '<%# Eval("sendCompany") %>'></asp:Label></td>        
                    <td><div runat="server" id="requestShippingId"></div></td>                             
                    <td><asp:Label runat="server" ID = "preReceivedDate" Text= '<%#Eval("preReceivedDate") %>' ></asp:Label></td>                         
                    <td><asp:Label runat="server" ID = "receivedMan" Text= '<%#Eval("receivedMan") %>' ></asp:Label></td>      
                    <td><asp:Label runat="server" ID = "receivedDate" Text= '<%#Eval("receivedDate") %>' ></asp:Label></td>                         
                </tr>
                 </ItemTemplate>
                 <FooterTemplate>
                    </tbody>
                </table>  
                 </FooterTemplate>
             </asp:Repeater>        
        </div> 
</asp:Content>
